
/* 
*选项卡调用
 */
tabCard('.loginrightforma a', '.loginrightform div')

//表单账号验证:输入事件时:显示icon,

//获取元素
let userinp=document.querySelector('.userinp')
let password=document.querySelector('.password')

let icon1=document.querySelector('.icon1')
let icon2=document.querySelector('.icon2')

console.log(icon1,icon2,userinp,password);

//1账号框注册事件
userinp.addEventListener('input',function(){
  // console.log(9);
  if(userinp.value.length>0){
    // console.log(9);
    icon1.style.display='block'
  }else{
    // console.log(0);
    icon1.style.display='none'
  }
})
//2密码框注册事件
password.addEventListener('input',function(){
  // console.log(9);
  if(password.value.length>0){
    // console.log(9);
    icon2.style.display='block'
  }else{
    // console.log(0);
    icon2.style.display='none'
  }
})

//3点击ico1n删除文本框内容,并隐藏自己
icon1.addEventListener('click',function(){
  userinp.value=''
  icon1.style.display=''
})

//4点击icon2删除文本框内容,并隐藏自己
icon2.addEventListener('click',function(){
  password.value=''
  icon2.style.display=''
})
